import request from "@/utils/request";

export const registerAPI = ({ username, email, password, repassword }) => {
  return request({
    url: "/register",
    method: "post",
    data: {
      username,
      email,
      password,
      repassword,
    },
  });
};

/**
 * 登录接口
 * @param {*} param0 { email:邮箱地址, password: 密码}
 * @returns
 */
export const loginAPI = ({ email, password }) => {
  return request({
    url: "/login",
    method: "post",
    data: {
      email,
      password,
    },
  });
};
